/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package bmacotada.orm;

public class Cuestionario_1 {
	public Cuestionario_1() {
	}
	
	private java.util.Set this_getSet (int key) {
		if (key == bmacotada.orm.ORMConstants.KEY_CUESTIONARIO_1_PREGUNTA_1PR_ID_PREGUNTA) {
			return ORM_pregunta_1Pr_id_pregunta;
		}
		
		return null;
	}
	
	private void this_setOwner(Object owner, int key) {
		if (key == bmacotada.orm.ORMConstants.KEY_CUESTIONARIO_1_PACIENTE_1RUT) {
			this.paciente_1Rut = (bmacotada.orm.Paciente_1) owner;
		}
	}
	
	org.orm.util.ORMAdapter _ormAdapter = new org.orm.util.AbstractORMAdapter() {
		public java.util.Set getSet(int key) {
			return this_getSet(key);
		}
		
		public void setOwner(Object owner, int key) {
			this_setOwner(owner, key);
		}
		
	};
	
	private int cu_id_cuestionario;
	
	private String descripcion;
	
	private bmacotada.orm.Paciente_1 paciente_1Rut;
	
	private java.util.Set ORM_pregunta_1Pr_id_pregunta = new java.util.HashSet();
	
	private void setCu_id_cuestionario(int value) {
		this.cu_id_cuestionario = value;
	}
	
	public int getCu_id_cuestionario() {
		return cu_id_cuestionario;
	}
	
	public int getORMID() {
		return getCu_id_cuestionario();
	}
	
	public void setDescripcion(String value) {
		this.descripcion = value;
	}
	
	public String getDescripcion() {
		return descripcion;
	}
	
	public void setPaciente_1Rut(bmacotada.orm.Paciente_1 value) {
		if (paciente_1Rut != null) {
			paciente_1Rut.cuestionario_1.remove(this);
		}
		if (value != null) {
			value.cuestionario_1.add(this);
		}
	}
	
	public bmacotada.orm.Paciente_1 getPaciente_1Rut() {
		return paciente_1Rut;
	}
	
	/**
	 * This method is for internal use only.
	 */
	public void setORM_Paciente_1Rut(bmacotada.orm.Paciente_1 value) {
		this.paciente_1Rut = value;
	}
	
	private bmacotada.orm.Paciente_1 getORM_Paciente_1Rut() {
		return paciente_1Rut;
	}
	
	private void setORM_Pregunta_1Pr_id_pregunta(java.util.Set value) {
		this.ORM_pregunta_1Pr_id_pregunta = value;
	}
	
	private java.util.Set getORM_Pregunta_1Pr_id_pregunta() {
		return ORM_pregunta_1Pr_id_pregunta;
	}
	
	public final bmacotada.orm.Pregunta_1SetCollection pregunta_1Pr_id_pregunta = new bmacotada.orm.Pregunta_1SetCollection(this, _ormAdapter, bmacotada.orm.ORMConstants.KEY_CUESTIONARIO_1_PREGUNTA_1PR_ID_PREGUNTA, bmacotada.orm.ORMConstants.KEY_PREGUNTA_1_CUESTIONARIO_1CU_ID_CUESTIONARIO, bmacotada.orm.ORMConstants.KEY_MUL_MANY_TO_MANY);
	
	public String toString() {
		return String.valueOf(getCu_id_cuestionario());
	}
	
}
